package cn.ysnk.clz.interceptor.security;

import org.springframework.dao.DataAccessException;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

import cn.ysnk.clz.entity.dataUser.DataUser;


public class MyCustomUserDetailsService implements UserDetailsService{

	public UserDetails loadUserByUsername(String userName) throws UsernameNotFoundException, DataAccessException {
		return DataUser.userDao.findUserByUserName(userName).switch2User();
	}

}
